package com.s4j.struts.biz.model;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;

/**
 * 辅助检查实体
 * @author Administrator
 *
 */
@Entity
@Table(name="BIZ_MG_SUPPLEMENT")
public class BizMgSupplement {

	private Long suppId;
	
	private PatientDoc patient;
	
	private Integer antibody;	//抗乙酰胆碱受体抗体试验	1是  2否
	
	private String biopsy;	//肌肉活检
	
	private String emg; 	//肌电图
	
	private String bloodGas; 	//血气组合
	
	private List<MgSuppImmun> immus;	//免疫学指标
	
	private List<MgSuppInspect> inspects;	//其他项目

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public Long getSuppId() {
		return suppId;
	}

	public void setSuppId(Long suppId) {
		this.suppId = suppId;
	}

	@OneToOne  
    @JoinColumn(name="patientId",insertable=true,unique=true)
	public PatientDoc getPatient() {
		return patient;
	}

	public void setPatient(PatientDoc patient) {
		this.patient = patient;
	}

	@Column(precision=2)
	public Integer getAntibody() {
		return antibody;
	}

	public void setAntibody(Integer antibody) {
		this.antibody = antibody;
	}

	@Column(length=200)
	public String getBiopsy() {
		return biopsy;
	}

	public void setBiopsy(String biopsy) {
		this.biopsy = biopsy;
	}

	@Column(length=200)
	public String getEmg() {
		return emg;
	}

	public void setEmg(String emg) {
		this.emg = emg;
	}

	@Column(length=200)
	public String getBloodGas() {
		return bloodGas;
	}

	public void setBloodGas(String bloodGas) {
		this.bloodGas = bloodGas;
	}

	@OneToMany(cascade=CascadeType.ALL,fetch=FetchType.LAZY,mappedBy="supp")
	public List<MgSuppImmun> getImmus() {
		return immus;
	}

	public void setImmus(List<MgSuppImmun> immus) {
		this.immus = immus;
	}

	@OneToMany(cascade=CascadeType.ALL,fetch=FetchType.LAZY,mappedBy="supp")
	public List<MgSuppInspect> getInspects() {
		return inspects;
	}

	public void setInspects(List<MgSuppInspect> inspects) {
		this.inspects = inspects;
	}
}
